<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<link rel="stylesheet"
		href="../resources/css/smoothness/jquery-ui-1.8.16.custom.css"
		type="text/css" />
	<script language="javascript" type="text/javascript"
		src="../resources/js/default.js"></script>
	<title>Alunos Cursos</title>
</h:head>
<h:body>


	
	<h:form id="form">
		<fieldset>

			<legend >Seja Bem-vindo ao Portal do Aluno</legend>

				
				<p:toolbar>
					<p:toolbarGroup align="left">
						<p:commandButton id="modalDialogBoletin" value="Boletim" image="ui-icon-search" onclick="dlg1.show();" type="button"/>
							
						
							<p:dialog id="modalBoletin" header="Boletin" widgetVar="dlg1"
							
							
						modal="true" height="360" width="600">


						<h:form prependId="false">

							<h:messages />
							<h:panelGrid columns="2">

							</h:panelGrid>

						</h:form>
					
					</p:dialog>
							
						<p:commandButton id="modalDialogHistorico" value="Historico" image="ui-icon-note" onclick="dlg5.show();" type="button"/>
							<p:dialog id="modalHistorico" header="Historico" widgetVar="dlg5"
						modal="true" height="360" width="600">


						<h:form prependId="false">

							<h:messages />
							<h:panelGrid columns="2">

							</h:panelGrid>

						</h:form>
					</p:dialog>
						
						
					<p:commandButton id="modalDialogButton" value="Dados Pessoais" image="ui-icon-person" onclick="dlg2.show();" type="button"/>
						<p:dialog id="modalDialog" header="Dados Pessoais" widgetVar="dlg2"
						modal="true" height="360" width="600">

						<h:form prependId="false">
							
						<h:messages />
							<h:panelGrid columns="2">	
								
								
								<h:outputText value="Nome: " />
								<p:inplace id="basicaooooooooooooooooooooooooooooooooooooo">
									<p:inputText value="#{alunoBean.aluno.nome}" />
								</p:inplace>
								
								
								<h:outputText value="Ajax Inplace Editor: " />  
            <p:inplace id="ajaxInplace" editor="true">  
                <p:inputText value="#{alunoBean.aluno.nome}"  
                            required="true" label="text"/>  
            </p:inplace>
            					
									<h:outputText value="Basic Input: " />
									<p:inplace id="basic">
										<p:inputText value="Edit Me" />
									</p:inplace>

									<f:facet name="footer">
										<p:commandButton type="button" action="#{usuarioBean.salvar}"
											value="Salvar" icon="ui-icon-check" />
									</f:facet>
									
							</h:panelGrid>	
						</h:form>	
					</p:dialog>


					<p:commandButton id="modalDialogMatricula" value="Matricula" image="ui-icon-disk" onclick="dlg3.show();" type="button"/>
					<p:dialog id="modalMatricula" header="Matricula" widgetVar="dlg3"
						modal="true" height="360" width="600">


						<h:form prependId="false">

							<h:messages />
							<h:panelGrid columns="2">

							</h:panelGrid>

						</h:form>
					</p:dialog>

					
					</p:toolbarGroup>
					<p:toolbarGroup align="right">
						<p:commandButton value="Sair" image="ui-icon-power" />
					</p:toolbarGroup>
				</p:toolbar>

				<p:messages />
				<h:panelGrid columns="2">

				
				<h:form prependId="false">  
  
    				<p:dataTable id="dataTable" value="#{alunoBean.alunos}" var="aluno">  
  
        			<f:facet name="header">  
            			Lista de Alunos
            		</f:facet>
            	
            		<p:column>  
           				<f:facet name="header"> ID </f:facet>
            			<h:outputText value="#{aluno.id}" />  
        			</p:column>
            		 <p:column>  
           				<f:facet name="header"> Nome </f:facet>
            			<h:outputText value="#{aluno.nome}" />  
        			</p:column>  
        			<p:column>  
           				<f:facet name="header"> e-mail </f:facet>
            			<h:outputText value="#{aluno.email}" />  
        			</p:column> 
        				<p:column>  
           				<f:facet name="header"> Curso </f:facet>
            			<h:outputText value="#{aluno.curso.nome}" />  
        			</p:column> 
        			
        			<f:facet name="footer">  
            			Total #{fn:length(alunoBean.alunos)} Alunos 
        			</f:facet> 
            	
					</p:dataTable>
				</h:form>

			</h:panelGrid>
			
		</fieldset>
	</h:form>

</h:body>
</html>